import requests
class add:
    def __init__(self):
        self.s=requests.session()
        self.s.get("http://192.168.4.226/TinyShop_v1.7/index.php?con=admin&act=captcha&h=40&w=120&bc=3f4657&c=ffffff")
        data = {"name": "admin", "password": "123456", 'verifyCode': "aaaa"}
        self.url = "http://192.168.4.226/TinyShop_v1.7/index.php?con=admin&act=check"
        m = self.s.post(url=self.url, data=data)
        # print(m.text)
    def add(self,m):
        # m={'name':'sasasds','password':'我们啊我们啊','repassword':'123456','email':'5师大82@qq.com','real_name':'sas'}
        x=self.s.post(url="http://192.168.4.226/TinyShop_v1.7/index.php?con=customer&act=customer_save",data=m)
        # print(x.text)
        return x.text

if __name__=="__main__":
    a=add()
    a.add()